package com.java.escape.springproblem.applicationcontext;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;

/**
 * @ClassName ApplicationContextStore
 * @Description <h4>保存应用上下文<h4/>
 * @Author wyp
 * @Date 2023/9/12 9:26
 * @Version 1.0
 */
@Slf4j
public class ApplicationContextStore {
    private static ApplicationContext applicationContext;

    public static void setApplicationContext(ApplicationContext applicationContext) {
        ApplicationContextStore.applicationContext = applicationContext;
        log.info("获取到上下文了");
    }

    public static ApplicationContext getApplicationContext() {
        return ApplicationContextStore.applicationContext;
    }

}
